<!DOCTYPE html>
<html lang="zh">

<head>
    <title>登录 - Log4j2 核弹级漏洞演示</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta charset="UTF-8"/>
    <meta name="keywords" content="Log4j2,漏洞,安全"/>
    <link rel="stylesheet" href="css/css2.css">
    <link rel="stylesheet" href="css/style.css" type="text/css" media="all"/>
    <link rel="stylesheet" href="css/font-awesome.min.css" type="text/css" media="all">
</head>

<body>
<section class="w3l-hotair-form">
    <h1>Log4j2 核弹级漏洞演示</h1>
    <div class="container">
        <div class="workinghny-form-grid">
            <div class="main-hotair">
                <div class="content-wthree">
                    <h2>登录</h2>
                    <form id="login-form">
                        <input type="text" class="text" name="act" placeholder="账号" required="">
                        <input type="password" class="password" name="pwd" placeholder="密码" required="">
                        <button id="login-btn" class="btn" type="button">登录</button>
                    </form>
                </div>
                <div class="w3l_form align-self">
                    <div class="left_grid_info"></div>
                </div>
            </div>
        </div>
    </div>
    <div class="copyright text-center">
        <p class="copy-footer-29">Copyright &copy; 2021 ABCDEFG.COM All rights reserved.
            <a target="_blank" href="https://gitee.com/Morningyet/Log4j2-CVE-2021-44228">明天徐(https://gitee.com/Morningyet/Log4j2-CVE-2021-44228)</a>
        </p>
    </div>
</section>
<script src="js/jquery.min.js"></script>

<script>

    if (!window.localStorage) {
        alert("请使用支持localStorage的浏览器!!!");
    }

    $("#login-btn").click(function () {
        $.ajax({
            type: "POST",
            url: "/user/login",
            data: $('#login-form').serialize(),
            async: false,
            error: function (request) {
                alert("登录失败!");
            },
            success: function (data) {
                window.localStorage.setItem('bug-log4j2-token', data);
                window.location.href = "/index.html"
            }
        });
    });
</script>

</body>
</html>